'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.get('/user', controller.user.user);
  router.all('/api/user/search', controller.user.search);
  router.all('/api/user/login', controller.user.login);
  router.all('/api/generic/search', controller.home.search);
  router.all('/api/generic/create', controller.home.create);
  router.all('/api/generic/update', controller.home.update);
  router.all('/api/generic/delete', controller.home.delete);
  router.all('/api/generic/findById', controller.home.findById);
  router.all('/api/generic/findAll', controller.home.findAll);

  router.all('/api/medic/list', controller.medic.search); 
  router.all('/api/system/excel/medic', controller.excel.medic);
};
